/*
 * Copyright 2018 Red Hat, Inc. and/or its affiliates.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

[data-i18n-prefix="SmallSwitchComponentView."] {

  .kie-small-switch {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 14px;

    input {
      opacity: 0;
      width: 0;
      height: 0;
    }

    [data-field="checkbox-text"] {
      position: absolute;
      left: 38px;
      font-size: 10px;
      color: #555;
    }

    .kie-slider {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: #ccc;
      -webkit-transition: .4s;
      transition: .4s;
      border-radius: 14px;
    }

    .kie-slider:before {
      position: absolute;
      content: "";
      height: 10px;
      width: 10px;
      left: 2px;
      bottom: 2px;
      background-color: white;
      -webkit-transition: .4s;
      transition: .4s;
      border-radius: 50%;
    }

    input:checked + .kie-slider {
      background-color: #0088ce;
    }

    input:focus + .kie-slider {
      box-shadow: inset 0 1px 1px rgba(3, 3, 3, .075), 0 0 8px rgba(0, 136, 206, 1);
    }

    input:checked + .kie-slider:before {
      -webkit-transform: translateX(18px);
      -ms-transform: translateX(18px);
      transform: translateX(18px);
    }
  }
}
